package day03_homework;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test04 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            list.add(r.nextInt(100));
            System.out.println(list.get(i));
        }
        System.out.println(list);
        List<Integer> list1 = list.subList(2, 6);
        System.out.println(list1);

        System.out.println(list1);
        System.out.println(list);
    }
}
